package Command;

import junit.framework.TestCase;

public class MainCommandTest2 extends TestCase {
	public void test1() throws Exception  {
		System.out.println("----------test 1---------------");
		MainCommand testCommand = new MainCommand();
		if (testCommand==null){
			System.out.println("???");
		}
		testCommand.addSource("c:\\test");
	}
	public void test2() throws Exception  {
		System.out.println("----------test 2---------------");
		MainCommand testCommand = new MainCommand();
		if (testCommand==null){
			System.out.println("???");
		}
		testCommand.addSource("c:\\test");
		String a[]= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		//while (true){}
	}
	public void test3() throws Exception  {
		System.out.println("----------test 3---------------");
		MainCommand testCommand = new MainCommand();
		if (testCommand==null){
			System.out.println("???");
		}
		String a[]= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		testCommand.addSource("c:\\test");
		a= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		//while (true){}
	}
	public void test4() throws Exception  {
		System.out.println("----------test 4---------------");
		MainCommand testCommand = new MainCommand();
		String a[];
		testCommand.addSource("c:\\test");
		a= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		testCommand.deleteSource("c:\\test");
		a= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		testCommand.addSource("c:\\test");
		a= testCommand.returnAllSource();
		for (int i =0; i<a.length;i++){
			System.out.println(a[i]);
		}
		//while (true){}
	}
	public void test5() throws Exception  {
		System.out.println("----------test 5---------------");
		MainCommand testCommand = new MainCommand();
		testCommand.addSource("c:\\test");
		testCommand.startObserver();

		/////////////while (true){}
	}
	public void test6() throws Exception  {
		System.out.println("----------test 6---------------");
		MainCommand testCommand = new MainCommand();
		testCommand.addSource("c:\\test");
		testCommand.addSource("c:\\test2");
		testCommand.startObserver();

		while (true){}
	}

}
